package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    @Select("SELECT * FROM setmeal_dish WHERE dish_id = #{id}")
    List<SetmealDish> selectByDishId(Long id);

//    @Insert("INSERT INTO setmeal_dish(setmeal_id, dish_id, name, price, copies) VALUES(#{setmealId}, #{dishId}, #{name}, #{price}, #{copies})")
    void insert(List<SetmealDish> setmealDishes);

    @Select("SELECT * FROM setmeal_dish WHERE setmeal_id = #{id}")
    List<SetmealDish> selectById(Long id);
}
